
package com.rt.schedulenew.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rt.schedulebase.dto.DictPatientSourceDto;
import com.rt.schedulebase.entity.DictPatientSource;
import com.rt.schedulebase.mapper.DictPatientSourceMapper;
import com.rt.schedulenew.api.IDictPatientSourceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DictPatientSourceServiceImpl extends ServiceImpl<DictPatientSourceMapper, DictPatientSource> implements IDictPatientSourceService {
    @Override
    public List<DictPatientSource> getList(DictPatientSourceDto dto) {
        QueryWrapper<DictPatientSource> qw = new QueryWrapper();
        Map<String, Object> map = new HashMap<String, Object>();
        qw.allEq(map, false);
        List<DictPatientSource> list = baseMapper.selectList(qw);
        return list;
    }

    @Override
    public List<DictPatientSource> getListAll() {
        return baseMapper.selectList(null);
    }

    @Override
    public DictPatientSource getInfo(DictPatientSourceDto dto) {
        QueryWrapper<DictPatientSource> qw = new QueryWrapper<>();
        Map<String, Object> map = new HashMap<>();
        qw.allEq(map, false);
        return baseMapper.selectOne(qw);
    }
}
